package com.acc.service.impl;

import java.util.List;
import java.util.Set;

import com.acc.dao.AdminLoginDAO;
import com.acc.dao.impl.AdminLoginDAOImpl;
import com.acc.entity.Admin;
import com.acc.service.AdminLoginService;
/**
 * 
 * @author 朱春阳
 *
 */
public class AdminLoginServiecImpl implements AdminLoginService {

	private AdminLoginDAO adminlogindao = new AdminLoginDAOImpl();
 	@Override
	public Admin isLogin(String userName, String password) {
		// TODO Auto-generated method stub
		Admin admin = adminlogindao.login(userName, password);;
		
		return admin;
	}
	@Override
	public List<String> getAllRolesByAdminName(String userName) {
		// TODO Auto-generated method stub
		List<String> roles = adminlogindao.getAllRolesByName(userName);
		return roles;
	}
	@Override
	public Set<String> getAllURIbyRole(String role) {
		// TODO Auto-generated method stub
		Set<String> uris = adminlogindao.getAllUri(role);
		return uris;
	}

}
